package com.example.dto;

public class LoginResponse {
    private String accessToken;  // 认证依据
    private String tokenType;    // 认证类型
    private String username;     // 用户名（可选）
    private String role;         // 用户角色（可选）
    private long expiresIn;      // Token 有效期（可选）

    // 构造器：仅包含 accessToken 和 tokenType
    public LoginResponse(String accessToken, String tokenType) {
        this.accessToken = accessToken;
        this.tokenType = tokenType;
    }

    // 构造器：包含所有参数
    public LoginResponse(String accessToken, String tokenType, String username, String role, long expiresIn) {
        this.accessToken = accessToken;
        this.tokenType = tokenType;
        this.username = username;
        this.role = role;
        this.expiresIn = expiresIn;
    }

    // Getters and Setters
    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getTokenType() {
        return tokenType;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public long getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(long expiresIn) {
        this.expiresIn = expiresIn;
    }
}
